/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: javase2203 - For4
 * <p>Powered by webrx On 2022-07-14 10:47:19
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class For4 {
    public static void main(String[] args) {
        //要求：输出2 4 6 ,8 ,10;
        for (int i = 2; i <= 10; i += 2) {
            System.out.println(i);
        }

        //for continue break; (初值;条件;增量)
        for (int i = 1; i <= 10; i++) {
            if (i % 2 != 0) {
                continue; //结束本次循环，立即开始下一次，直接到for(;;此处)
            }
            if(i>5) break; //结束循环语句
            System.out.println(i);
        }


    }
}
